﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="jpagerequest._Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <script type="text/javascript" src="Scripts/jquery-1.3.2.min.js"></script>
    <script type="text/javascript" src="Scripts/jquery.updatepanel.js"></script>
    
    <script type="text/javascript">

        $(document).ready(function() {

            $('#UpdatePanel1').panelCreated(function() {
                alert('Created update panel ONE ...');
            });

            $('#UpdatePanel2').panelCreated(function() {
                alert('Created update panel TWO ...');
            });

            $('#UpdatePanel1').panelUpdated(function() {
                alert('Updated update panel ONE ...');
            });

            $('#UpdatePanel2').panelUpdated(function() {
                alert('Updated update panel TWO ...');
            });

            $('#UpdatePanel1').panelReady(function() {
                alert('update panel ONE ready ...');
            });

            $('#UpdatePanel2').panelReady(function() {
                alert('update panel TWO ready...');
            });

            $('#UpdatePanel1').beginRequest(function() {
                alert('Update panel BEGIN REQUEST...');
            });

            $('#UpdatePanel1').initializeRequest(function(options) {
                //options.cancel = true;
                alert('Update panel INIT REQUEST...');
            });

        });

    </script>
    
</head>
<body>
    <form id="form1" runat="server">
    
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
    <div>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Button ID="Button1" runat="server" Text="Button1" /><br />
                <asp:Label ID="Label1" runat="server" Text="Label1"></asp:Label>
            </ContentTemplate>
        </asp:UpdatePanel>
        
        <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:Button ID="Button2" runat="server" Text="Button1" /><br />
                <asp:Label ID="Label2" runat="server" Text="Label2"></asp:Label>
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>
